package top.iflyoung.cim.biz.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import top.iflyoung.cim.biz.entity.User;

import java.util.List;

/**
 * @author liguiyang
 * @description 用户Mapper
 * @sine 1.8
 * @date 2021/9/222:09
 **/
public interface UserMapper extends BaseMapper<User> {
    /**
     * 根据类型查询出用户列表
     *
     * @param type
     * @return
     */
    List<User> queryUserList(@Param("type") Integer type);

    /**
     * 获取用户
     *
     * @param user
     * @return
     */
    Long saveAndGet(@Param("user") User user);

    /**
     * 获取所有在线的用户
     *
     * @return
     */
    List<User> queryAllOnlineUsers();
}
